﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BrewTarget.Units
{
    public class Volume : BaseUnit
    {
        public double Milliliters { get; set; }

        public Volume()
        {
            Milliliters = 0;
        }

        public double Liters
        {
            get { return Milliliters / 1000; }
            set { Milliliters = value * 1000; }
        }

        // US Measurements!

        public double US_Teaspoon
        {
            get { return Milliliters * 4.92892; }
            set { Milliliters = value * 4.92892; }
        }

        public double US_Tablespoon
        {
            get { return US_Teaspoon / 3;  }
            set { US_Teaspoon = value * 3; }
        }

        public double US_Cup
        {
            get { return US_Tablespoon / 16; }
            set { US_Tablespoon = value * 16; }
        }

        public double US_Quart
        {
            get { return US_Cup / 4; }
            set { US_Cup = value * 4; }
        }

        public double US_Gallon
        {
            get { return US_Quart / 4; }
            set { US_Quart = value * 4; }
        }

        public double US_Barrel
        {
            get { return US_Gallon / 31; }
            set { US_Gallon = value * 31; }
        }

        // UK Measurements

        public double UK_Teaspoon
        {
            get { return Milliliters * 5.91939; }
            set { Milliliters = value * 5.91939; }
        }

        public double UK_Tablespoon
        {
            get { return UK_Teaspoon / 3; }
            set { UK_Teaspoon = value * 3; }
        }

        public double UK_Cup
        {
            get { return UK_Tablespoon / 16; }
            set { UK_Tablespoon = value * 16; }
        }

        public double UK_Quart
        {
            get { return UK_Cup / 4; }
            set { UK_Cup = value * 4; }
        }

        public double UK_Gallon
        {
            get { return UK_Quart / 4; }
            set { UK_Quart = value * 4; }
        }

        public double UK_Barrel
        {
            get { return UK_Gallon / 36; }
            set { UK_Gallon = value * 36; }
        }



    }
}
